<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <template>
    <div>测试webscoket</div>
</template>
</body>

<script>
    let ws = new WebSocket("ws://localhost:3002/bigscreen/websockets?id=10086")

    ws.onopen =function(){
        console.log("链接成功")
    } 

    ws.onmessage = function (evt){
        console.log(evt.data)
    }
</script>

</html>